Skip to content

Conversation

@vstinner
Copy link
Contributor

@vstinner vstinner commented Dec 4, 2025

No description provided.

Comment on lines +122 to +123
INADA-san wrote that most users either overestimate its effectiveness or don't
fully understand how it operates.
Copy link
Contributor

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this apply to some other proposals as well?
How do the other functions behave if input contains duplicate keys?

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Doesn't this apply to some other proposals as well?

I don't know, I don't want to speak for @methane.

How do the other functions behave if input contains duplicate keys?

So far, all proposed functions allocates N items even if there are duplicate keys.

Comment on lines +165 to +166
Such function lacks an *override* argument to decide how to deal with
overridden keys on updating an existing dictionary.
Copy link
Contributor

@encukou encukou Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

So if we add an override argument, there's no downside?

Copy link
Contributor Author

@vstinner vstinner Dec 5, 2025

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Well, I prefer PyDict_FromItems() to create a dictionary :-) PyDict_FromItems() has less parameters and so is simpler.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants